import Column from "./components/column.tsx";

const DashboardMonitor = () => {
  const data = [
    { type: "家具家电", sales: 38, name: "A" },
    { type: "粮油副食", sales: 52, name: "B" },
    { type: "生鲜水果", sales: 61, name: "C" },
    { type: "美容洗护", sales: 145, name: "D" },
    { type: "母婴用品", sales: 48, name: "E" },
    { type: "进口食品", sales: 38, name: "F" },
    { type: "食品饮料", sales: 38, name: "G" },
    { type: "家庭清洁", sales: 38, name: "H" },
  ];
  const config = {
    data,
    xField: "type",
    yField: "sales",
    label: {
      // 可手动配置 label 数据标签位置
      position: "top",
      // 配置样式
      style: {
        // fill: "red",
      },
    },
  };

  return (
    <div>
      <h1>监控页面</h1>

      <Column {...config} />

      <hr />

      <Column data={data} xField={"name"} yField={"sales"} />
    </div>
  );
};

export default DashboardMonitor;
